<?php

namespace App\Http\Controllers;

use Illuminate\Support\Facades\DB;

class Announcement extends Base
{

    public function logic()
    {
        $row = DB::table('t_announcement_info')->where('status', 1)->orderBy('create_time')->get()->map(function ($value) {
            return (array)$value;
        });
        $ac_arr = array();
        foreach ($row as $a) {
            $arr['id']      = $a['id'];
            $arr['content'] = $a['content'];
            $arr['head']    = $a['head'];
            $ac_arr[]       = $arr;
        }
        return $this->returnData(["ac_list" => $ac_arr]);
    }
}
